//
//  ContactSearchViewNotFoundCell.swift
//  Showing
//
//  Created by Ralf on 15/5/9.
//  Copyright (c) 2015年 com.starlooking. All rights reserved.
//

import UIKit

class ContactSearchViewNotFoundCell: UITableViewCell
{
    let screen = UIScreen.mainScreen().bounds

    override func awakeFromNib()
    {
        super.awakeFromNib()

        var label = self.viewWithTag(20) as? UILabel
        if (label == nil)
        {
            let frame = CGRect(x: 0, y: 0, width: screen.size.width, height: 80)
            label = UILabel(frame: frame)
            label!.textAlignment = .Center
            label!.text = "没有数据"
            label!.tag = 20
            self.addSubview(label!)
        }
    }

    override func setSelected(selected: Bool, animated: Bool)
    {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

    class func cellWithTableView(tableView: UITableView!) -> ContactSearchViewNotFoundCell
    {

        var cell = tableView.dequeueReusableCellWithIdentifier("NOT_FOUND") as? ContactSearchViewNotFoundCell
        if (cell == nil)
        {
            cell = NSBundle.mainBundle().loadNibNamed("ContactSearchViewNotFoundCell", owner: tableView, options: nil)[0] as? ContactSearchViewNotFoundCell
        }

        return cell!
    }
}
